package com.room.observeroom;

import com.room.User;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.RawQuery;
import androidx.room.Update;

@Dao
public interface ScoreDao {

    @Insert
    void insert(Score... score);//插入数据

    @Update
    void update(Score... score);//修改数据

    @Query("delete from score")
    void clear();//清空数据

    @Query("select * from score")
    LiveData<List<Score>> getAllScore();//livedata绑定数据，对查询的数据进行观察

    @Delete
    void delect(Score... score);

}
